﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ClusteringProblem.Maths.Metrics
{
    public class GowerDistance : IDistance
    {
        public double ComputeDistance(Model.IVectorType x, Model.IVectorType y)
        {
            int vectorLength = x.Vector.Length;
            double result = 0.0;

            for (int i = 0; i < vectorLength; ++i)
            {
                result += Math.Abs(x.Vector[i] - y.Vector[i]);
            }

            return result / vectorLength;
            throw new NotImplementedException();
        }
    }
}
